import request from "@/utils/request";

// 获取验证码
export const getNumberApi = (params) => {
  return request({
    method: "GET",
    url: "/captcha",
    params,
    // 转码  不转是乱码
    responseType: "blob",
  });
};

//登录

export const loginApi = (data) => {
  return request({
    method: "POST",
    url: "/login",
    data,
  });
};

//查询用户可用的菜单

export const getUserMenuApi = () => {
  return request({
    method: "GET",
    url: "/menus",
  });
};
